﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JoyTalq.Core.Business.Domain;

namespace JoyTalq.Core.Business.Persistence
{
    public interface IBusinessDao
    {
        /// <summary>
        /// 新增企業資料主檔
        /// </summary>
        /// <param name="customerVO">被新增的企業資料主檔</param>
        /// <returns>新增後的企業資料主檔</returns>
        CustomerVO CreateCustomer(CustomerVO customerVO);

        /// <summary>
        /// 更新企業資料主檔
        /// </summary>
        /// <param name="customerVO">被更新的企業資料主檔</param>
        /// <returns>更新後的企業資料主檔</returns>
        CustomerVO UpdateCustomer(CustomerVO customerVO);

        /// <summary>
        /// 刪除企業資料主檔
        /// </summary>
        /// <param name="customerVO">被刪除的企業資料主檔</param>
        void DeleteCustomer(CustomerVO customerVO);

        /// <summary>
        /// 取得企業資料主檔 By 識別碼
        /// </summary>
        /// <param name="customerId">識別碼</param>
        /// <returns>企業資料主檔</returns>
        CustomerVO GetCustomerById(Guid customerId);

        /// <summary>
        /// 取得企業資料主檔清單
        /// </summary>
        /// <param name="queryString">搜尋語法，用Where...order by ...</param>
        /// <returns>企業資料主檔清單</returns>
        IList<CustomerVO> GetCustomerList(string queryString);

        /// <summary>
        /// 取得企業資料主檔清單
        /// </summary>
        /// <param name="queryString">搜尋語法，用Where...order by ...</param>
        /// <param name="pageIndex">分頁索引</param>
        /// <param name="pageSize">分頁大小</param>
        /// <returns>企業資料主檔清單</returns>
        IList<CustomerVO> GetCustomerList(string queryString, int pageIndex, int pageSize);

        /// <summary>
        /// 取得全部的企業資料主檔清單
        /// </summary>
        /// <returns>全部的企業資料主檔清單</returns>
        IList<CustomerVO> GetAllCustomerList();

        /// <summary>
        /// 取得全部的企業資料主檔清單
        /// </summary>
        /// <param name="pageIndex">分頁索引</param>
        /// <param name="pageSize">分頁大小</param>
        /// <returns>全部的企業資料主檔清單</returns>
        IList<CustomerVO> GetAllCustomerList(int pageIndex, int pageSize);

        /// <summary>
        /// 取得全部的企業資料主檔清單
        /// </summary>
        /// <param name="pageIndex">分頁索引</param>
        /// <param name="pageSize">分頁大小</param>
        /// <param name="sortField">排序欄位</param>
        /// <param name="sortDesc">升降冪排序</param>
        /// <returns>全部的企業資料主檔清單</returns>
        IList<CustomerVO> GetAllCustomerList(int pageIndex, int pageSize, string sortField, bool sortDesc);

        /// <summary>
        /// 新增品牌資料主檔
        /// </summary>
        /// <param name="brandVO">被新增的品牌資料主檔</param>
        /// <returns>新增後的品牌資料主檔</returns>
        BrandVO CreateBrand(BrandVO brandVO);

        /// <summary>
        /// 更新品牌資料主檔
        /// </summary>
        /// <param name="brandVO">被更新的品牌資料主檔</param>
        /// <returns>更新後的品牌資料主檔</returns>
        BrandVO UpdateBrand(BrandVO brandVO);

        /// <summary>
        /// 刪除品牌資料主檔
        /// </summary>
        /// <param name="brandVO">被刪除的品牌資料主檔</param>
        void DeleteBrand(BrandVO brandVO);

        /// <summary>
        /// 取得品牌資料主檔 By 識別碼
        /// </summary>
        /// <param name="brandId">識別碼</param>
        /// <returns>品牌資料主檔</returns>
        BrandVO GetBrandById(Guid brandId);
    }
}
